<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

    <title> - 登录</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href="css/login.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <script>
        if (window.top !== window.self) {
            window.top.location = window.location;
        }
    </script>

</head>

<body class="signin">
<div class="panel-body">
    <form class="form-horizontal" th:action="@{/loginAction}" th:object="${user}" method="post">
        <!--每一个属性的外标签与输入框构成一个form-group元组-->
        <div class="form-group">
            <!--如下的class属性是为了其能够根据屏幕的大小自动拉伸-->
            <label for="username" class="col-sm-2 control-label">
                用户名：
            </label>
            <div class="col-sm-10">
                <!--此处的placholder意为不输入任何东西的说明灰字，当然在IE8中无法解释。id看不出有什么作用，仅仅是根据Bootstrap中文文档的要求而添加的-->
                <input type="text" name="username" class="form-control"
                       placeholder="用户名" id="username" />
            </div>
        </div>
        <div class="form-group">
            <label for="password" class="col-sm-2 control-label">
                密码：
            </label>
            <div class="col-sm-10">
                <input type="password" name="password" class="form-control"
                       placeholder="密码" id="password" />
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <!--此处的button与HTML的普通submit按钮是有区别的，但不影响表单的提交-->
                <button type="submit" class="btn btn-info">
                    登陆
                </button>
                <!--<small>标签保证了这段文字与submit按钮同一行-->
                <small> 没有账号？<a
                        href="http://2.com">点击注册</a> </small>
            </div>
        </div>
    </form>
</div>
</body>

</html>
